<!--{include(file='head.html')}-->
<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<form action="<!--{url('admin','role','rolesave')}-->" method="post" name="submitform" id="submitform">
		<div id="main_c">
		<!--{if $opertype == "edit"}-->
			<ul class="bk">
				<li>
					<label><em>*</em>角色名称：</label>
					<p>
						<input class="input_tx" value="<!--{$role.name}-->" name="name" id="name" type="text" />
					</p>
				</li>
				<li>
					<label>角色描述：</label>
					<p>
						<textarea name="desc" id="desc" class="text_tx"><!--{$role.desc}--></textarea>
					</p>
				</li>
				<li>
					<label><em>*</em>权限选择：</label>
					<p>
						<!--{foreach $privlist key prev}-->
							<input type="checkbox" name="privilege[]" value="<!--{$key}-->" id="privilege<!--{$key}-->" 
							<!--{if strpos($role.privilege,$key)!==false}-->checked<!--{/if}-->/><!--{$prev}-->
						<!--{/foreach}-->
					</p>
				</li>
			</ul>
		<!--{elseif $opertype=="add"}-->
			<ul class="bk">
				<li>
					<label><em>*</em>角色名称：</label>
					<p>
						<input class="input_tx" value="" name="name"  id="name" type="text" />
					</p>
				</li>
				<li>
					<label>角色描述：</label>
					<p>
						<textarea name="desc" id="desc" class="text_tx"></textarea>
					</p>
				</li>
				<li>
					<label><em>*</em>权限选择：</label>
					<p>
						<!--{foreach $privlist key prev}-->
						<input type="checkbox" name="privilege[]" value="<!--{$key}-->" id="privilege<!--{$key}-->"/> <!--{$prev}-->
						<!--{/foreach}-->
					</p>
				</li>
			</ul>
		<!--{/if}-->
			<div class="bt_bk2">
				<input type="hidden" value="<!--{$opertype}-->" name="opertype" />
				<input type="hidden" value="<!--{def($roleid)}-->" name="roleid" />
				<a href="javascript:void(0);" class="btn" onclick="jssubmit('role');return false;"><span>保存</span></a>
			</div>
		</div>
		</form>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
